
import request from "./axios";

import { requestHandle } from "./axios";

import { R, API_PREFIX } from "@/assets/js/dict.js"

/**
 * 查找家长未读的消息数量
 * @param params
 * @param call
 */
export function getCountMsgOfParent(params, call) {
    requestHandle(request({
        url: `${API_PREFIX}/parent/action/countNewMsg`,
        method: 'get',
        params
    }), call)
}

/*
* 查询家长未读的消息数量 最新的消息内容
* */
export function queryNewMsgInfoForParent(params, call) {
    requestHandle(request({
        url: `${API_PREFIX}/parent/action/latestMsgInfo`,
        method: 'get',
        params
    }), call)
}

/*
* 查询家教未读的消息数量 最新的消息内容
* */
export function queryNewMsgInfoForTutor(params, call) {
    requestHandle(request({
        url: `${API_PREFIX}/tutor/action/latestMsgInfo`,
        method: 'get',
        params
    }), call)
}

/**
 * 查找家长的正在教学的订单数量
 * @param params
 * @param call
 */
export function countTeachingOfParent(params, call) {
    requestHandle(request({
        url: `${API_PREFIX}/parent/action/countTeachingOfParent`,
        method: 'get',
        params
    }), call)
}



/**
 * 查找家长的历史订单数量
 * @param params
 * @param call
 */
export function countHistoryOfParent(params, call) {
    requestHandle(request({
        url: `${API_PREFIX}/parent/action/countHistoryOfParent`,
        method: 'get',
        params
    }), call)
}


/*
* 查找家长的待定订单数量
* */
export function countPreOrderOfParent(params, call) {
    requestHandle(request({
        url: `${API_PREFIX}/parent/action/countPreOrderOfParent`,
        method: 'get',
        params
    }), call)
}

/*
* 家教首页数据
* */
export function homeInfoOfTutor(params, call) {
    requestHandle(request({
        url: `${API_PREFIX}/tutor/action/homeInfo`,
        method: 'get',
        params
    }), call)
}

/*
* 家长首页数据
* */
export function homeInfoOfParent(params, call) {
    requestHandle(request({
        url: `${API_PREFIX}/parent/action/homeInfo`,
        method: 'get',
        params
    }), call)
}